#include"progress.h"
typedef void (*call)(double total,double current);
void download(call c,double total)
{
    srand((unsigned int)time(NULL));
    double cur=0;
    while(cur<=total)
    {
        c(total,cur);
         int speed =rand()%11;
         usleep(50000);
         cur+=speed;
    }
    c(total,total);
    printf("\n%s\n","下载完成！！！");
}
int main()
{
    //shouwprogressbar();
    download(filueshprocessbar,1024.0);
   // download(filueshprocessbar,2133);
    return 0;
}


